package edu.yourl.web;

import org.apache.wicket.markup.repeater.data.ListDataProvider;
import org.apache.wicket.spring.injection.annot.SpringBean;

import edu.yourl.domain.Gossip;
import edu.yourl.presenter.ISearchPresenter;
import edu.yourl.web.components.FavoritableResultsPanel;
import edu.yourl.web.components.GossipListPanel;

public class ResultsPage extends BasePage {

	@SpringBean(name = "searchPresenter")
	ISearchPresenter searchPresenter;

	public ResultsPage(String search) {
		add(new FavoritableResultsPanel("gossipers", searchPresenter
				.searchFavoritables(search)));
		add(new GossipListPanel("gossips", new ListDataProvider<Gossip>(
				searchPresenter.searchGossips(search))));
	}
}
